<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
<title>Pearl</title>
<link rel="previous" href="range.html">
<link rel="ToC" href="index.html">
<link rel="up" href="index.html">
<link rel="index" href="docindex.html">
<link rel="next" href="licence.html">
</head>
<body>
<p><a href="range.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="licence.html">Next</a></p>
<h1><a name="C36"></a>Chapter 36: <a name="i0"></a>Pearl</h1>
<p>
You have a grid of squares. Your job is to draw lines between the centres of horizontally or vertically adjacent squares, so that the lines form a single closed loop. In the resulting grid, some of the squares that the loop passes through will contain corners, and some will be straight horizontal or vertical lines. (And some squares can be completely empty &#8211; the loop doesn't have to pass through every square.)
</p>
<p>
Some of the squares contain black and white circles, which are clues that the loop must satisfy.
</p>
<p>
A black circle in a square indicates that that square is a corner, but neither of the squares adjacent to it in the loop is also a corner.
</p>
<p>
A while circle indicates that the square is a straight edge, but <em>at least one</em> of the squares adjacent to it in the loop is a corner.
</p>
<p>
(In both cases, the clue only constrains the two squares adjacent <em>in the loop</em>, that is, the squares that the loop passes into after leaving the clue square. The squares that are only adjacent <em>in the grid</em> are not constrained.)
</p>
<p>
Credit for this puzzle goes to <a name="i1"></a>Nikoli, who call it &#8216;Masyu&#8217;. <a href="#p0">[19]</a>.
</p>
<p>
Thanks to James Harvey for assistance with the implementation.
</p>
<p><a name="p0"></a>
[19] <a href="http://www.nikoli.co.jp/en/puzzles/masyu/"><code>http://www.nikoli.co.jp/en/puzzles/masyu/</code></a>
</p>
<h2><a name="S36.1"></a>36.1 <a name="i2"></a>Pearl controls</h2>
<p>
Click with the left button on a grid edge to draw a segment of the loop through that edge, or to remove a segment once it is drawn.
</p>
<p>
Drag with the left button through a series of squares to draw more than one segment of the loop in one go. Alternatively, drag over an existing part of the loop to undraw it, or to undraw part of it and then go in a different direction.
</p>
<p>
Click with the right button on a grid edge to mark it with a cross, indicating that you are sure the loop does not go through that edge. (For instance, if you have decided which of the squares adjacent to a white clue has to be a corner, but don't yet know which way the corner turns, you might mark the one way it <em>can't</em> go with a cross.)
</p>
<p>
Alternatively, use the cursor keys to move the cursor. Use the Enter key to begin and end keyboard `drag' operations. Use the Space key to cancel the drag. Use Ctrl-arrowkey and Shift-arrowkey to simulate a left or right click, respectively, on the edge in the given direction relative to the cursor, i.e. to draw a segment or a cross.
</p>
<p>
(All the actions described in <a href="common.html#S2.2">section 2.2</a> are also available.)
</p>
<h2><a name="S36.2"></a>36.2 <a name="i3"></a>Pearl parameters</h2>
<p>
These parameters are available from the &#8216;Custom...&#8217; option on the &#8216;Type&#8217; menu.
</p>
<dl><dt>
<em>Width</em>, <em>Height</em>
</dt>
<dd>
Size of grid in squares.
</dd>
<dt>
<em>Difficulty</em>
</dt>
<dd>
Controls the difficulty of the generated puzzle.
</dd>
</dl>

<hr><address>
[Puzzles S60 version 1.5.r9411]</address></body>
</html>
